﻿<%@ Page Title="" Language="C#" MasterPageFile="~/_BackEnd.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Baopx.BackEnd.MangeAccount.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cplMain" runat="server">
    <asp:DataGrid ID="grdAccount" runat="server" AutoGenerateColumns="False" 
        ShowFooter="true" AllowPaging="true"
        BackColor="White" BorderColor="#999999" BorderStyle="None" 
        BorderWidth="1px" onitemcommand="ItemCommand" 
        onitemdatabound="ItemDataBound">
        <AlternatingItemStyle BackColor="#DCDCDC" />
        <Columns>
            <asp:TemplateColumn>
                <HeaderTemplate>Id</HeaderTemplate>
                <ItemTemplate><%#Eval("Id") %></ItemTemplate>
                <FooterTemplate></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>UserRole</HeaderTemplate>
                <ItemTemplate>
                    <asp:DropDownList runat="server" ID="cboUserRole">
                    </asp:DropDownList>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:DropDownList runat="server" ID="cboUserRole">
                    </asp:DropDownList></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>UserName</HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox runat="server" ID="txtUserName" Text='<%#Eval("UserName") %>' Width="100px" /></ItemTemplate>
                <FooterTemplate><asp:TextBox runat="server" ID="txtUserName" Width="100px"/></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>Password</HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox runat="server" ID="txtPassword" Text='<%#Eval("Password") %>' Width="100px" /></ItemTemplate>
                <FooterTemplate> <asp:TextBox runat="server" ID="txtPassword" Width="100px" /></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>Email</HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox runat="server" ID="txtEmail" Text='<%#Eval("Email") %>' Width="100px" /></ItemTemplate>
                <FooterTemplate> <asp:TextBox runat="server" ID="txtEmail" Width="100px" /></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>FirstName</HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox runat="server" ID="txtFirstName" Text='<%#Eval("FirstName") %>' Width="100px" /></ItemTemplate>
                <FooterTemplate> <asp:TextBox runat="server" ID="txtFirstName" Width="100px" /></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>LastName</HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox runat="server" ID="txtLastName" Text='<%#Eval("LastName") %>' Width="100px" /></ItemTemplate>
                <FooterTemplate> <asp:TextBox runat="server" ID="txtLastName" Width="100px" /></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>Active</HeaderTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <ItemTemplate>
                    <asp:CheckBox ID="chkActive" runat="server" Checked='<%#Eval("IsActive") %>' /></ItemTemplate>
                <FooterTemplate></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <ItemTemplate>
                    <asp:ImageButton ID="btnUpdate" runat="server" CommandName="cmdUpdate" CommandArgument='<%#Eval("Id") %>' ImageUrl='/Images/BackEnd/Icon/update.png' Width="24px" />
                    <asp:ImageButton ID="btnDelete" runat="server" OnClientClick="return confirm('Bạn có muốn xóa record này không?');" CommandName="cmdDelete" CommandArgument='<%#Eval("Id") %>' ImageUrl='/Images/BackEnd/Icon/delete.png'  Width="24px" />
                </ItemTemplate>
                <FooterStyle HorizontalAlign="Center" />
                <FooterTemplate>
                    <asp:ImageButton ID="btnAddNew" runat="server" CommandName="cmdAddNew" ImageUrl='/Images/BackEnd/Icon/add.png'  Width="24px" />
                </FooterTemplate>
            </asp:TemplateColumn>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White"  HorizontalAlign="Center" />
        <ItemStyle BackColor="#EEEEEE" ForeColor="Black" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" 
            Mode="NumericPages" />
        <SelectedItemStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
    </asp:DataGrid>
</asp:Content>
